package com.iplant.wms.service.po.mss;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

/**
 * 周转规则详情
 */
@DBBasePO(TableName ="mss_transferprop" ,CheckName = {"Code","RuleID,BatchPropID"},
        Schemas = DBSchemas.WMS,CodeAuto = true,CodePrefix = "ZZXQ-")
public class MSSTransferProp extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 规则  Active  1必输  2禁用  3可选
     */
    @DBCondition
    @DBField(CheckValue = true)
    public int RuleID = 0;

    @DBCondition
    @DBJoin(name = "Code",tableName = "mss_transferrule", tableAsName = "r1",
            Schemas = DBSchemas.WMS,MainTableField ="RuleID")
    public String RuleCode = "";
    @DBJoin(name = "Name",tableName = "mss_transferrule", tableAsName = "r1",
            Schemas = DBSchemas.WMS,MainTableField ="RuleID")
    public String RuleName = "";


    @DBCondition
    @DBField(CheckValue = true)
    public int BatchRuleID = 0;

    @DBCondition
    @DBJoin(name = "Code",tableName = "mss_batchrule", tableAsName = "p1",
            Schemas = DBSchemas.WMS,MainTableField ="BatchRuleID")
    public String BatchRuleCode = "";
    @DBJoin(name = "Name",tableName = "mss_batchrule", tableAsName = "p1",
            Schemas = DBSchemas.WMS,MainTableField ="BatchRuleID")
    public String BatchRuleName = "";


    @DBCondition
    @DBField(CheckValue = true)
    public int BatchPropID = 0;

    @DBJoin(name = "Code",tableName = "mss_batchprop", tableAsName = "p2",
            Schemas = DBSchemas.WMS,MainTableField ="BatchPropID")
    public String BatchPropCode = "";

    @DBJoin(name = "Name",tableName = "mss_batchprop", tableAsName = "p2",
            Schemas = DBSchemas.WMS,MainTableField ="BatchPropID")
    public String BatchPropName = "";

    /**
     * 顺序号
     */
    @DBField
    public int SortIndex = 0;

    @DBField
    public int CompareTypeID = 1;

    @JsonProperty("RuleID")
    public int getRuleID() {
        return RuleID;
    }

    public void setRuleID(int ruleID) {
        RuleID = ruleID;
    }

    @JsonProperty("RuleCode")
    public String getRuleCode() {
        return RuleCode;
    }

    public void setRuleCode(String ruleCode) {
        RuleCode = ruleCode;
    }

    @JsonProperty("RuleName")
    public String getRuleName() {
        return RuleName;
    }

    public void setRuleName(String ruleName) {
        RuleName = ruleName;
    }

    @JsonProperty("BatchRuleID")
    public int getBatchRuleID() {
        return BatchRuleID;
    }

    public void setBatchRuleID(int batchRuleID) {
        BatchRuleID = batchRuleID;
    }

    @JsonProperty("BatchRuleCode")
    public String getBatchRuleCode() {
        return BatchRuleCode;
    }

    public void setBatchRuleCode(String batchRuleCode) {
        BatchRuleCode = batchRuleCode;
    }

    @JsonProperty("BatchRuleName")
    public String getBatchRuleName() {
        return BatchRuleName;
    }

    public void setBatchRuleName(String batchRuleName) {
        BatchRuleName = batchRuleName;
    }

    @JsonProperty("BatchPropID")
    public int getBatchPropID() {
        return BatchPropID;
    }

    public void setBatchPropID(int batchPropID) {
        BatchPropID = batchPropID;
    }

    @JsonProperty("BatchPropCode")
    public String getBatchPropCode() {
        return BatchPropCode;
    }

    public void setBatchPropCode(String batchPropCode) {
        BatchPropCode = batchPropCode;
    }

    @JsonProperty("BatchPropName")
    public String getBatchPropName() {
        return BatchPropName;
    }

    public void setBatchPropName(String batchPropName) {
        BatchPropName = batchPropName;
    }

    @JsonProperty("SortIndex")
    public int getSortIndex() {
        return SortIndex;
    }

    public void setSortIndex(int sortIndex) {
        SortIndex = sortIndex;
    }

    @JsonProperty("CompareTypeID")
    public int getCompareTypeID() {
        return CompareTypeID;
    }

    public void setCompareTypeID(int compareTypeID) {
        CompareTypeID = compareTypeID;
    }
}
